package com.wnhoo.smartfishtank.api.other;

/**
 * Created by kevinwen on 2014/11/dataplug_listshow_icon.
 * Copyright (c) 2014/11/dataplug_listshow_icon.KevinWen. All rights reserved.
 */
public class ErrorCodeAPIs {

    public final static int ERROR_CODE_EXISTS = 20002;

    /**
     * 由错误码转错误描述
     * @param error_code
     * @return
     */
    public static String getErrorDES(String error_code){

        int code = Integer.valueOf(error_code);
        String error_des = null;
        switch (code){
            case ERROR_CODE_EXISTS:
                error_des = "设备已经存在";
                break;
            case 10009:
                //参数值非法，请参考API文档
                error_des = "无法识别您所添加的设备";
                break;
            default:
                error_des = "未知错误";
                break;
        }
        return null;
    }

}
